3.197 \(\int \cot ^6(e+f x) (a+b \tan ^2(e+f x)) \, dx\)

Optimal. Leaf size=61 \[ \frac {(a-b) \cot ^3(e+f x)}{3 f}-\frac {(a-b) \cot (e+f x)}{f}-x (a-b)-\frac {a \cot ^5(e+f x)}{5 f} \]

[Out]

-(a-b)*x-(a-b)*cot(f*x+e)/f+1/3*(a-b)*cot(f*x+e)^3/f-1/5*a*cot(f*x+e)^5/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3629, 12, 3473, 8} \[ \frac {(a-b) \cot ^3(e+f x)}{3 f}-\frac {(a-b) \cot (e+f x)}{f}-x (a-b)-\frac {a \cot ^5(e+f x)}{5 f} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^6*(a + b*Tan[e + f*x]^2),x]

[Out]

-((a - b)*x) - ((a - b)*Cot[e + f*x])/f + ((a - b)*Cot[e + f*x]^3)/(3*f) - (a*Cot[e + f*x]^5)/(5*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3629

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[
((A*b^2 + a^2*C)*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*
Tan[e + f*x])^(m + 1)*Simp[a*(A - C) - (A*b - b*C)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C}, x] &&
 NeQ[A*b^2 + a^2*C, 0] && LtQ[m, -1] && NeQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \cot ^6(e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=-\frac {a \cot ^5(e+f x)}{5 f}-\int (a-b) \cot ^4(e+f x) \, dx\\ &=-\frac {a \cot ^5(e+f x)}{5 f}-(a-b) \int \cot ^4(e+f x) \, dx\\ &=\frac {(a-b) \cot ^3(e+f x)}{3 f}-\frac {a \cot ^5(e+f x)}{5 f}-(-a+b) \int \cot ^2(e+f x) \, dx\\ &=-\frac {(a-b) \cot (e+f x)}{f}+\frac {(a-b) \cot ^3(e+f x)}{3 f}-\frac {a \cot ^5(e+f x)}{5 f}-(a-b) \int 1 \, dx\\ &=-(a-b) x-\frac {(a-b) \cot (e+f x)}{f}+\frac {(a-b) \cot ^3(e+f x)}{3 f}-\frac {a \cot ^5(e+f x)}{5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.05, size = 69, normalized size = 1.13 \[ -\frac {a \cot ^5(e+f x) \, _2F_1\left (-\frac {5}{2},1;-\frac {3}{2};-\tan ^2(e+f x)\right )}{5 f}-\frac {b \cot ^3(e+f x) \, _2F_1\left (-\frac {3}{2},1;-\frac {1}{2};-\tan ^2(e+f x)\right )}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^6*(a + b*Tan[e + f*x]^2),x]

[Out]

-1/5*(a*Cot[e + f*x]^5*Hypergeometric2F1[-5/2, 1, -3/2, -Tan[e + f*x]^2])/f - (b*Cot[e + f*x]^3*Hypergeometric
2F1[-3/2, 1, -1/2, -Tan[e + f*x]^2])/(3*f)

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 64, normalized size = 1.05 \[ -\frac {15 \, {\left (a - b\right )} f x \tan \left (f x + e\right )^{5} + 15 \, {\left (a - b\right )} \tan \left (f x + e\right )^{4} - 5 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} + 3 \, a}{15 \, f \tan \left (f x + e\right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

-1/15*(15*(a - b)*f*x*tan(f*x + e)^5 + 15*(a - b)*tan(f*x + e)^4 - 5*(a - b)*tan(f*x + e)^2 + 3*a)/(f*tan(f*x
+ e)^5)

________________________________________________________________________________________

giac [B]  time = 3.26, size = 168, normalized size = 2.75 \[ \frac {3 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 35 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 20 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 480 \, {\left (f x + e\right )} {\left (a - b\right )} + 330 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 300 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - \frac {330 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 300 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 35 \, a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 20 \, b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, a}{\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5}}}{480 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

1/480*(3*a*tan(1/2*f*x + 1/2*e)^5 - 35*a*tan(1/2*f*x + 1/2*e)^3 + 20*b*tan(1/2*f*x + 1/2*e)^3 - 480*(f*x + e)*
(a - b) + 330*a*tan(1/2*f*x + 1/2*e) - 300*b*tan(1/2*f*x + 1/2*e) - (330*a*tan(1/2*f*x + 1/2*e)^4 - 300*b*tan(
1/2*f*x + 1/2*e)^4 - 35*a*tan(1/2*f*x + 1/2*e)^2 + 20*b*tan(1/2*f*x + 1/2*e)^2 + 3*a)/tan(1/2*f*x + 1/2*e)^5)/
f

________________________________________________________________________________________

maple [A]  time = 0.44, size = 67, normalized size = 1.10 \[ \frac {b \left (-\frac {\left (\cot ^{3}\left (f x +e \right )\right )}{3}+\cot \left (f x +e \right )+f x +e \right )+a \left (-\frac {\left (\cot ^{5}\left (f x +e \right )\right )}{5}+\frac {\left (\cot ^{3}\left (f x +e \right )\right )}{3}-\cot \left (f x +e \right )-f x -e \right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x)

[Out]

1/f*(b*(-1/3*cot(f*x+e)^3+cot(f*x+e)+f*x+e)+a*(-1/5*cot(f*x+e)^5+1/3*cot(f*x+e)^3-cot(f*x+e)-f*x-e))

________________________________________________________________________________________

maxima [A]  time = 0.79, size = 61, normalized size = 1.00 \[ -\frac {15 \, {\left (f x + e\right )} {\left (a - b\right )} + \frac {15 \, {\left (a - b\right )} \tan \left (f x + e\right )^{4} - 5 \, {\left (a - b\right )} \tan \left (f x + e\right )^{2} + 3 \, a}{\tan \left (f x + e\right )^{5}}}{15 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^6*(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

-1/15*(15*(f*x + e)*(a - b) + (15*(a - b)*tan(f*x + e)^4 - 5*(a - b)*tan(f*x + e)^2 + 3*a)/tan(f*x + e)^5)/f

________________________________________________________________________________________

mupad [B]  time = 11.94, size = 57, normalized size = 0.93 \[ -x\,\left (a-b\right )-\frac {\left (a-b\right )\,{\mathrm {tan}\left (e+f\,x\right )}^4+\left (\frac {b}{3}-\frac {a}{3}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^2+\frac {a}{5}}{f\,{\mathrm {tan}\left (e+f\,x\right )}^5} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(e + f*x)^6*(a + b*tan(e + f*x)^2),x)

[Out]

- x*(a - b) - (a/5 - tan(e + f*x)^2*(a/3 - b/3) + tan(e + f*x)^4*(a - b))/(f*tan(e + f*x)^5)

________________________________________________________________________________________

sympy [A]  time = 4.42, size = 97, normalized size = 1.59 \[ \begin {cases} \tilde {\infty } a x & \text {for}\: \left (e = 0 \vee e = - f x\right ) \wedge \left (e = - f x \vee f = 0\right ) \\x \left (a + b \tan ^{2}{\relax (e )}\right ) \cot ^{6}{\relax (e )} & \text {for}\: f = 0 \\- a x - \frac {a}{f \tan {\left (e + f x \right )}} + \frac {a}{3 f \tan ^{3}{\left (e + f x \right )}} - \frac {a}{5 f \tan ^{5}{\left (e + f x \right )}} + b x + \frac {b}{f \tan {\left (e + f x \right )}} - \frac {b}{3 f \tan ^{3}{\left (e + f x \right )}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**6*(a+b*tan(f*x+e)**2),x)

[Out]

Piecewise((zoo*a*x, (Eq(e, 0) | Eq(e, -f*x)) & (Eq(f, 0) | Eq(e, -f*x))), (x*(a + b*tan(e)**2)*cot(e)**6, Eq(f
, 0)), (-a*x - a/(f*tan(e + f*x)) + a/(3*f*tan(e + f*x)**3) - a/(5*f*tan(e + f*x)**5) + b*x + b/(f*tan(e + f*x
)) - b/(3*f*tan(e + f*x)**3), True))

________________________________________________________________________________________